import { IResult, IResultConfirm } from '@/types/response'
function isOK(res: IResult): res is IResultConfirm {
    return !!res && res.code == 0 && !!res.result
}

// type T1 =  NonNullable<IResult>

function isDataOK(res: IResult): res is IResultConfirm {
    return !!res && res.code == 0 && !!res.result
}

function isMsgOK(res: IResult) {
    return res.code == 0
}



export { isOK, isDataOK, isMsgOK }
